package id.net.iconpln.bb.client.view;

import id.net.iconpln.bb.client.data.TestData;
import id.net.iconpln.bb.client.model.BbEntryJadwalBean;
import id.net.iconpln.bb.client.model.BbEntryTransportirBean;
import id.net.iconpln.bb.client.model.BbMasterPemasokBean;
import id.net.iconpln.bb.client.model.BbMstPembangkitBean;
import id.net.iconpln.bb.client.model.BbMstSurveyorBean;
import id.net.iconpln.bb.client.model.BeanModelMasterBb;
import id.net.iconpln.bb.client.service.BatubaraService;
import id.net.iconpln.bb.client.service.BatubaraServiceAsync;

import java.util.ArrayList;
import java.util.List;

import com.extjs.gxt.ui.client.Registry;
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
import com.extjs.gxt.ui.client.Style.Orientation;
import com.extjs.gxt.ui.client.Style.Scroll;
import com.extjs.gxt.ui.client.binding.FormBinding;
import com.extjs.gxt.ui.client.event.BaseEvent;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.util.IconHelper;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.Info;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.Window;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.DateField;
import com.extjs.gxt.ui.client.widget.form.FieldSet;
import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
import com.extjs.gxt.ui.client.widget.grid.CellSelectionModel;
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel;
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
import com.extjs.gxt.ui.client.widget.grid.Grid;
import com.extjs.gxt.ui.client.widget.grid.RowNumberer;
import com.extjs.gxt.ui.client.widget.layout.FitData;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.layout.FormData;
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
import com.extjs.gxt.ui.client.widget.layout.RowData;
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
import com.extjs.gxt.ui.client.widget.toolbar.LabelToolItem;
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
import com.google.gwt.core.client.GWT;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.rpc.AsyncCallback;

public class PageBbMasterTransportir extends LayoutContainer {
	private final BatubaraServiceAsync rkapService = GWT.create(BatubaraService.class);
	Grid<BeanModelMasterBb> grid;
	EditorGrid<BeanModelMasterBb> gridtrans;
	CheckBoxSelectionModel<BeanModelMasterBb> sm = new CheckBoxSelectionModel<BeanModelMasterBb>();
	Grid<BeanModelMasterBb> grid1;
	Grid<BeanModelMasterBb> gridVirtualPemasok;
	private List<BeanModelMasterBb> datakit;
	ListStore<BeanModelMasterBb> store1;
	private List<BeanModelMasterBb> datapemasok;
	private List<BeanModelMasterBb> datatrans;
	private List<BeanModelMasterBb> dataVirtualPemasok;
	ListStore<BeanModelMasterBb> store2;
	ListStore<BeanModelMasterBb> store3;
	ListStore<BeanModelMasterBb> storeVirtualPemasok;
	BeanModelMasterBb plant = new BeanModelMasterBb();
	ListStore<BeanModelMasterBb> store = new ListStore<BeanModelMasterBb>();
	private FormData formData;
	private FormBinding formBindings;
	ToolBar toolbar = new ToolBar();
	ToolBar toolbar1 = new ToolBar();
	ToolBar toolbar2 = new ToolBar();
	List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
	 ColumnConfig 	id_pemasok	 = new ColumnConfig();
	 ColumnConfig 	pemasok	 = new ColumnConfig();
	 ColumnConfig 	alamat	 = new ColumnConfig();
	 ColumnConfig 	pic_presdir	 = new ColumnConfig();
	 ColumnConfig 	pic_presdir_hp	 = new ColumnConfig();
	 ColumnConfig 	pic_dir_marketing	 = new ColumnConfig();
	 ColumnConfig 	pic_dir_marketing_hp	 = new ColumnConfig();
	 ColumnConfig 	pic_man_opr	 = new ColumnConfig();
	 ColumnConfig 	pic_man_opr_hp	 = new ColumnConfig();
	 ColumnConfig 	status_pemasok	 = new ColumnConfig();
	 ColumnConfig 	nama_tambang	 = new ColumnConfig();
	 ColumnConfig 	produksi	 = new ColumnConfig();
	 ColumnConfig 	loading_port	 = new ColumnConfig();
	 ColumnConfig 	fasilitas_loading	 = new ColumnConfig();
	 ColumnConfig 	jarak_hauling	 = new ColumnConfig();
	 ColumnConfig 	flag_blacklist	 = new ColumnConfig();
	 ColumnConfig 	status_aktif	 = new ColumnConfig();
	 ColumnConfig 	keterangan	 = new ColumnConfig();
	 ColumnConfig 	createby	 = new ColumnConfig();
	 ColumnConfig 	createdate	 = new ColumnConfig();
	 ColumnConfig 	updateby	 = new ColumnConfig();
	 ColumnConfig 	updatedate	 = new ColumnConfig();
	 ColumnConfig 	app_access	 = new ColumnConfig();
     Button btinsert;
     Button btupdate;
     Button btdelete;
     Button btcetak;
     public Window window;
     private BeanModelMasterBb transbean = new BeanModelMasterBb();
	
	@Override
	  protected void onRender(Element parent, int pos) {
	    super.onRender(parent, pos); 
	    setLayout(new FitLayout());  
	    DateTimeFormat dt = DateTimeFormat.getFormat("dd/MM/YYYY");
	    formData = new FormData("-20");
	    ContentPanel cp = new ContentPanel();  
	    cp.setHeading("Transportir");  
	    cp.setFrame(true);  
	    cp.setSize(1030, 600);  
	    cp.setLayout(new RowLayout(Orientation.HORIZONTAL));  
	  
	    grid1 = createGrid1();
	    grid = createGrid();
	    gridtrans = createGridtrans();
	  
	    
	    ContentPanel pan = new ContentPanel();
	    pan.setHeaderVisible(false);
	    pan.setLayout(new FitLayout());
	    pan.add(grid1);
	    toolbar1.add(new LabelToolItem("Daftar Pemasok"));
	    toolbar1.add(new SeparatorToolItem());
	    pan.setTopComponent(toolbar1);
	    
	    ContentPanel pan1 = new ContentPanel();
	    pan1.setHeaderVisible(false);
	    pan1.setLayout(new FitLayout());
	    pan1.add(grid);
	    toolbar2.add(new LabelToolItem("Daftar Pembangkit"));
	    toolbar2.add(new SeparatorToolItem());
	    pan1.setTopComponent(toolbar2);
	    
	    ContentPanel panel = new ContentPanel();
	    panel.setHeaderVisible(false);
	    panel.setLayout(new RowLayout(Orientation.VERTICAL));
	    panel.add(pan, new RowData(1, .5));
	    panel.add(pan1, new RowData(1, .5));
	    
	    Button bt = new Button("New");  
	    bt.addSelectionListener(new SelectionListener<ButtonEvent>() {  
	  
	      @Override  
	      public void componentSelected(ButtonEvent ce) {  
	    	  	
	    	  	FormPanel simple = new FormPanel();  
			    simple.setHeaderVisible(false);
			    simple.setFrame(true);  
			    simple.setWidth(350);
			    
			    FieldSet fieldSet = new FieldSet();  
			    fieldSet.setHeading("Identitas Transportir");  
			    fieldSet.setCollapsible(false);
			    
			    FormLayout layout = new FormLayout();  
			    layout.setLabelWidth(120);  
			    fieldSet.setLayout(layout);
			    
			    FieldSet fieldSet1 = new FieldSet();  
			    fieldSet1.setHeading("Informasi Kapal");  
			    fieldSet1.setCollapsible(false);
			    
			    FormLayout layout1 = new FormLayout();  
			    layout1.setLabelWidth(120);  
			    fieldSet1.setLayout(layout1);
			  
			    final TextField<String> txtnmtrans = new TextField<String>(); 
			    txtnmtrans.setFieldLabel("Nama Transportir"); 
			    txtnmtrans.setMaxLength(100);
			    fieldSet.add(txtnmtrans, formData);  
			    
			    final TextField<String> txtalamat = new TextField<String>(); 
			    txtalamat.setFieldLabel("Alamat"); 
			    txtalamat.setMaxLength(100);
			    fieldSet.add(txtalamat, formData);
			    
			    final TextField<String> txttlp = new TextField<String>(); 
			    txttlp.setFieldLabel("Telp"); 
			    txttlp.setMaxLength(100);
			    fieldSet.add(txttlp, formData);
			    
			    final TextField<String> txtpic = new TextField<String>(); 
			    txtpic.setFieldLabel("PIC"); 
			    txtpic.setMaxLength(100);
			    fieldSet.add(txtpic, formData);
			    
			    final TextField<String> txtnmtransport = new TextField<String>(); 
			    txtnmtransport.setFieldLabel("Nama Transport"); 
			    txtnmtransport.setMaxLength(100);
			    fieldSet1.add(txtnmtransport, formData);
			    
			    final TextField<String> txtjenistransport = new TextField<String>(); 
			    txtjenistransport.setFieldLabel("Jenis Transport"); 
			    txtjenistransport.setMaxLength(100);
			    fieldSet1.add(txtjenistransport, formData);
			    
			    final TextField<String> txtkodetransport = new TextField<String>(); 
			    txtkodetransport.setFieldLabel("Kode Transport"); 
			    txtkodetransport.setMaxLength(100);
			    fieldSet1.add(txtkodetransport, formData);
			    
			    final TextField<String> txtjumlahkapal = new TextField<String>(); 
			    txtjumlahkapal.setFieldLabel("Jumlah Kapal"); 
			    txtjumlahkapal.setMaxLength(100);
			    fieldSet1.add(txtjumlahkapal, formData);
			    
			    final TextField<String> txtspekkapal = new TextField<String>(); 
			    txtspekkapal.setFieldLabel("Spesifikasi Kapal"); 
			    txtspekkapal.setMaxLength(100);
			    fieldSet1.add(txtspekkapal, formData);
			    
			    simple.add(fieldSet);
			    simple.add(fieldSet1);
			   
			    
			    
			    simple.setButtonAlign(HorizontalAlignment.LEFT);  
			    simple.addButton(new Button("Cancel", new SelectionListener<ButtonEvent>() {  
			      @Override  
			      public void componentSelected(ButtonEvent ce) {  
			        grid.getStore().rejectChanges(); 
			        window.close();
			      }  
			    }));  
			    simple.addButton(new Button("Save", new SelectionListener<ButtonEvent>() {  
			      @Override  
			      public void componentSelected(ButtonEvent ce) {
			    	String session = Registry.get("isModule");  	
			    	BeanModelMasterBb aa = new BeanModelMasterBb();
			    	aa.setId_transportir(transbean.getId_transportir());
			    	aa.setNama_transportir(txtnmtrans.getValue());
			    	aa.setAlamat(txtalamat.getValue());
			    	aa.setTelp(txttlp.getValue());
			    	aa.setPic(txtpic.getValue());
			    	aa.setNama_transport(txtnmtransport.getValue());
			    	aa.setJenis_transport(txtjenistransport.getValue());
			    	aa.setKode_transport(txtkodetransport.getValue());
			    	aa.setJumlah_kapal(txtjumlahkapal.getValue());
			    	aa.setSpec_kapal(txtspekkapal.getValue());
			        aa.setCreateby(session);
			        aa.setApp_access("WEB App");
			    	
			    	
			  	  	rkapService.insertMasterBB(aa,"TRANSPORTIR","CREATE", new AsyncCallback<List<BeanModelMasterBb>>() {
						public void onFailure(Throwable caught) {
							GWT.log(caught.getMessage(), null);
						}

						public void onSuccess(List<BeanModelMasterBb> result) {
							gridtrans.mask("load Data ....","x-mask-loading");
					    	 store3.removeAll();
					    	 getdataTrans();
							
						}
					});
			        grid.getStore().commitChanges();
			        Info.display("Notifikasi: ", "Data Berhasil Di simpan");
			        window.close();
			      }  
			    }));  
			    
			    simple.setButtonAlign(HorizontalAlignment.CENTER); 
			    
			    formBindings = new FormBinding(simple, true); 
			    formBindings.setStore(store);
			    
			    Button btdalamCp = new Button("New", new SelectionListener<ButtonEvent>() {  
				      @Override  
				      public void componentSelected(ButtonEvent ce) {
				    	  	
				    	  	gridVirtualPemasok = createGridVirtualPemasok();
					  		ContentPanel pan1 = new ContentPanel();
					  	
					  		pan1.setButtonAlign(HorizontalAlignment.LEFT);  
					  		pan1.addButton(new Button("Cancel", new SelectionListener<ButtonEvent>() {  
						      @Override  
						      public void componentSelected(ButtonEvent ce) {  
						    	gridVirtualPemasok.getStore().rejectChanges(); 
						        window.close();
						      }  
						    }));  
					  		pan1.addButton(new Button("Save", new SelectionListener<ButtonEvent>() {  
						      @Override  
						      public void componentSelected(ButtonEvent ce) {
						    	  
						    	  gridVirtualPemasok.getStore().commitChanges();
							        Info.display("Notifikasi: ", "Data Berhasil Di Simpan");
							        window.close();
							      }  
						    }));  
						    
					  		pan1.setButtonAlign(HorizontalAlignment.CENTER);
					  	
					    	pan1.setHeaderVisible(false);
					  	    pan1.setLayout(new FitLayout());
					  	    pan1.setHeight(300);
					  	    pan1.setWidth(600);
					  	    pan1.add(gridVirtualPemasok);
					  
					  	    window = new Window();  
						    window.setHeading("New GRID Pemasok"); 
						    window.setLayout(new FitLayout());
						    window.setAutoHeight(true);
						    window.setWidth(600);
						    window.setScrollMode(Scroll.AUTO);
						    window.add(pan1);
						    
						    window.show();
				    	   
				      }  
				    });  
			    btdalamCp.setIcon(IconHelper.createStyle("icon-contact-add"));
			    
			    
			    ContentPanel cp = new ContentPanel();
			    
			    cp.setHeaderVisible(false);
			    ToolBar toolbar1 = new ToolBar();  
			    toolbar1.add(btdalamCp);
			    cp.setTopComponent(toolbar1);
			    cp.add(simple);
			    
			    window = new Window();  
			    window.setHeading("New Master Transportir");
//			    window.setLayout(new FitLayout());
			    window.setAutoHeight(true);
			    window.setAutoWidth(true);
			    window.add(cp);
			    
	        	window.show();
	      }  
	  
	    });
	    bt.setIcon(IconHelper.createStyle("icon-contact-add"));
	    
	    Button btload = new Button("Load", new SelectionListener<ButtonEvent>() {  
		      @Override  
		      public void componentSelected(ButtonEvent ce) {
		    	 gridtrans.mask("load Data ....","x-mask-loading");
		    	 store3.removeAll();
		    	 getdataTrans();
		      }  
		    });  
		    
	    btload.setIcon(IconHelper.createStyle("icon-reza-refresh"));
	    
	    btinsert = new Button("Simpan", new SelectionListener<ButtonEvent>() {  
		      @Override  
		      public void componentSelected(ButtonEvent ce) {
		    	 
		      }  
		    });  
		    
      btinsert.setIcon(IconHelper.createStyle("icon-reza-add"));
      
      btupdate = new Button("Ubah", new SelectionListener<ButtonEvent>() {  
		      @Override  
		      public void componentSelected(ButtonEvent ce) {
		    	  	FormPanel simple = new FormPanel();  
				    simple.setHeaderVisible(false);
				    simple.setFrame(true);  
				    simple.setWidth(350);  
				    
				    FieldSet fieldSet = new FieldSet();  
				    fieldSet.setHeading("Identitas Transportir");  
				    fieldSet.setCollapsible(false);
				    
				    FormLayout layout = new FormLayout();  
				    layout.setLabelWidth(120);  
				    fieldSet.setLayout(layout);
				    
				    FieldSet fieldSet1 = new FieldSet();  
				    fieldSet1.setHeading("Informasi Kapal");  
				    fieldSet1.setCollapsible(false);
				    
				    FormLayout layout1 = new FormLayout();  
				    layout1.setLabelWidth(120);  
				    fieldSet1.setLayout(layout1);
				  
				    final TextField<String> txtnmtrans = new TextField<String>(); 
				    txtnmtrans.setFieldLabel("Nama Transportir");
				    txtnmtrans.setValue(transbean.getNama_transportir());
				    txtnmtrans.setMaxLength(100);
				    fieldSet.add(txtnmtrans);  
				    
				    final TextField<String> txtalamat = new TextField<String>(); 
				    txtalamat.setFieldLabel("Alamat");
				    txtalamat.setValue(transbean.getAlamat());
				    txtalamat.setMaxLength(100);
				    fieldSet.add(txtalamat);
				    
				    final TextField<String> txttlp = new TextField<String>(); 
				    txttlp.setFieldLabel("Telp"); 
				    txttlp.setValue(transbean.getTelp());
				    txttlp.setMaxLength(100);
				    fieldSet.add(txttlp);
				    
				    final TextField<String> txtpic = new TextField<String>(); 
				    txtpic.setFieldLabel("PIC"); 
				    txtpic.setValue(transbean.getPic());
				    txtpic.setMaxLength(100);
				    fieldSet.add(txtpic);
				    
				    final TextField<String> txtnmtransport = new TextField<String>(); 
				    txtnmtransport.setFieldLabel("Nama Transport"); 
				    txtnmtransport.setValue(transbean.getNama_transport());
				    txtnmtransport.setMaxLength(100);
				    fieldSet1.add(txtnmtransport);
				    
				    final TextField<String> txtjenistransport = new TextField<String>(); 
				    txtjenistransport.setFieldLabel("Jenis Transport"); 
				    txtjenistransport.setValue(transbean.getJenis_transport());
				    txtjenistransport.setMaxLength(100);
				    fieldSet1.add(txtjenistransport);
				    
				    final TextField<String> txtkodetransport = new TextField<String>(); 
				    txtkodetransport.setFieldLabel("Kode Transport"); 
				    txtkodetransport.setValue(transbean.getKode_transport());
				    txtkodetransport.setMaxLength(100);
				    fieldSet1.add(txtkodetransport);
				    
				    final TextField<String> txtjumlahkapal = new TextField<String>(); 
				    txtjumlahkapal.setFieldLabel("Jumlah Kapal"); 
				    txtjumlahkapal.setValue(transbean.getJumlah_kapal());
				    txtjumlahkapal.setMaxLength(100);
				    fieldSet1.add(txtjumlahkapal);
				    
				    final TextField<String> txtspekkapal = new TextField<String>(); 
				    txtspekkapal.setFieldLabel("Spesifikasi Kapal"); 
				    txtspekkapal.setValue(transbean.getSpec_kapal());
				    txtspekkapal.setMaxLength(100);
				    fieldSet1.add(txtspekkapal);
				    
				    simple.add(fieldSet);
				    simple.add(fieldSet1);
				    
				    simple.setButtonAlign(HorizontalAlignment.LEFT);  
				    simple.addButton(new Button("Cancel", new SelectionListener<ButtonEvent>() {  
				      @Override  
				      public void componentSelected(ButtonEvent ce) {  
				        gridtrans.getStore().rejectChanges(); 
				        window.close();
				      }  
				    }));  
				    simple.addButton(new Button("update", new SelectionListener<ButtonEvent>() {  
				      @Override  
				      public void componentSelected(ButtonEvent ce) {
				    	String session = Registry.get("isModule");  	
				    	BeanModelMasterBb aa = new BeanModelMasterBb();
				    	aa.setId_transportir(transbean.getId_transportir());
				    	aa.setNama_transportir(txtnmtrans.getValue());
				    	aa.setAlamat(txtalamat.getValue());
				    	aa.setTelp(txttlp.getValue());
				    	aa.setPic(txtpic.getValue());
				    	aa.setNama_transport(txtnmtransport.getValue());
				    	aa.setJenis_transport(txtjenistransport.getValue());
				    	aa.setKode_transport(txtkodetransport.getValue());
				    	aa.setJumlah_kapal(txtjumlahkapal.getValue());
				    	aa.setSpec_kapal(txtspekkapal.getValue());
				        
				    	aa.setUpdateby(session);
				        aa.setApp_access("WEB App");
				    	
				    	
				  	  	rkapService.insertMasterBB(aa,"TRANSPORTIR","UPDATE", new AsyncCallback<List<BeanModelMasterBb>>() {
							public void onFailure(Throwable caught) {
								GWT.log(caught.getMessage(), null);
							}

							public void onSuccess(List<BeanModelMasterBb> result) {
								
								gridtrans.mask("load Data ....","x-mask-loading");
						    	 store3.removeAll();
						    	 getdataTrans();
							}
						});
				  	  	gridtrans.getStore().commitChanges();
				        Info.display("Notifikasi: ", "Data Berhasil Di Ubah");
				        window.close();
				      }  
				    }));  
				    
				    simple.setButtonAlign(HorizontalAlignment.CENTER); 
				    
				    formBindings = new FormBinding(simple, true); 
				    formBindings.setStore(store);
				    
				    Button btdalamCp = new Button("New", new SelectionListener<ButtonEvent>() {  
					      @Override  
					      public void componentSelected(ButtonEvent ce) {
					    	  gridVirtualPemasok = createGridVirtualPemasok();
						  		ContentPanel pan1 = new ContentPanel();
						  	
						  		pan1.setButtonAlign(HorizontalAlignment.LEFT);  
						  		pan1.addButton(new Button("Cancel", new SelectionListener<ButtonEvent>() {  
							      @Override  
							      public void componentSelected(ButtonEvent ce) {  
							    	gridVirtualPemasok.getStore().rejectChanges(); 
							        window.close();
							      }  
							    }));  
						  		pan1.addButton(new Button("Save", new SelectionListener<ButtonEvent>() {  
							      @Override  
							      public void componentSelected(ButtonEvent ce) {
							    	  
							    	  gridVirtualPemasok.getStore().commitChanges();
								        Info.display("Notifikasi: ", "Data Berhasil Di Simpan");
								        window.close();
								      }  
							    }));  
							    
						  		pan1.setButtonAlign(HorizontalAlignment.CENTER);
						  	
						    	pan1.setHeaderVisible(false);
						  	    pan1.setLayout(new FitLayout());
						  	    pan1.setHeight(300);
						  	    pan1.setWidth(600);
						  	    pan1.add(gridVirtualPemasok);
						  
						  	    window = new Window();  
							    window.setHeading("New GRID Pemasok"); 
							    window.setLayout(new FitLayout());
							    window.setAutoHeight(true);
							    window.setWidth(600);
							    window.setScrollMode(Scroll.AUTO);
							    window.add(pan1);
							    
							    window.show();
					      }  
					    });  
				    btdalamCp.setIcon(IconHelper.createStyle("icon-contact-add"));
				    
				    
				    ContentPanel cp = new ContentPanel();
				    
				    cp.setHeaderVisible(false);
				    ToolBar toolbar1 = new ToolBar();  
				    toolbar1.add(btdalamCp);
				    cp.setTopComponent(toolbar1);
				    cp.add(simple);
				    
				    window = new Window();  
				    window.setHeading("Edit Master Transportir");
//				    window.setLayout(new FitLayout());
				    window.setAutoHeight(true);
				    window.setAutoWidth(true);
				    window.add(cp);
				    
		        	window.show();
		      }  
		    });  
	   btupdate.setIcon(IconHelper.createStyle("icon-reza-edit"));
	   
	   btdelete = new Button("Delete", new SelectionListener<ButtonEvent>() {  
		      @Override  
		      public void componentSelected(ButtonEvent ce) {
		    	  	BeanModelMasterBb aa = new BeanModelMasterBb();
			    	aa.setId_transportir(transbean.getId_transportir());
			    	
			    	
			  	  	rkapService.insertMasterBB(aa,"TRANSPORTIR","DELETE", new AsyncCallback<List<BeanModelMasterBb>>() {
						public void onFailure(Throwable caught) {
							GWT.log(caught.getMessage(), null);
						}

						public void onSuccess(List<BeanModelMasterBb> result) {
							gridtrans.mask("load Data ....","x-mask-loading");
					    	 store3.removeAll();
					    	 getdataTrans();
							
						}
					});
			        grid.getStore().commitChanges();
			        Info.display("Notifikasi: ", "Data Berhasil Di Delete");
			        window.close();
		      }  
		    });  
	   btdelete.setIcon(IconHelper.createStyle("icon-reza-delete"));
	   
	   btcetak = new Button("Cetak", new SelectionListener<ButtonEvent>() {  
		      @Override  
		      public void componentSelected(ButtonEvent ce) {
		    	  
		      }  
		    });  
	    btcetak.setIcon(IconHelper.createStyle("icon-printer"));
	    
	    ContentPanel cppasokan = new ContentPanel();
	    cppasokan.setHeaderVisible(false);
	    cppasokan.add(gridtrans);
	    cppasokan.setLayout(new FitLayout());
	    toolbar.add(new LabelToolItem("Daftar Transportir"));
//	    toolbar.add(new SeparatorToolItem());
//	    toolbar.add(btload);
	    toolbar.add(new SeparatorToolItem());
	    toolbar.add(bt);
	    toolbar.add(new SeparatorToolItem());
//	    toolbar.add(btinsert);
//		toolbar.add(new SeparatorToolItem());
	    toolbar.add(btupdate);
		toolbar.add(new SeparatorToolItem()); 
		toolbar.add(btdelete);
//		toolbar.add(new SeparatorToolItem()); 
//		toolbar.add(btcetak);
	    cppasokan.setTopComponent(toolbar);
	    
	    ContentPanel delimeter = new ContentPanel();
	    delimeter.setHeaderVisible(false);
	    delimeter.setWidth(10);
	    
	    cp.add(panel, new RowData(.4, 1));  
	    cp.add(delimeter, new FitData(5));
	    cp.add(cppasokan, new RowData(.6, 1));
	    add(cp, new FitData(5)); 
	  }  
	  
	private EditorGrid<BeanModelMasterBb> createGridtrans() {  
	    
		   
	    final List<ColumnConfig> columns = new ArrayList<ColumnConfig>(); 
	    
	    store3 = new ListStore<BeanModelMasterBb>();
		getdataTrans();
	    
	    RowNumberer id = new RowNumberer();  
	    id.setWidth(30);  
	    
	    ColumnConfig namatransportir = new ColumnConfig("nama_transportir", "Nama Transportir", 200);
	    namatransportir.setAlignment(HorizontalAlignment.LEFT);
	    
	    ColumnConfig alamat = new ColumnConfig("alamat", "Alamat", 200);
	    alamat.setAlignment(HorizontalAlignment.LEFT);
	    
	    ColumnConfig telp = new ColumnConfig("telp", "Telp", 80);
	    telp.setAlignment(HorizontalAlignment.LEFT);
	    
	    ColumnConfig pic = new ColumnConfig("pic", "PIC", 80);
	    pic.setAlignment(HorizontalAlignment.LEFT);
	    
	    ColumnConfig namatransport = new ColumnConfig("nama_transport", "Nama Transport", 200);
	    namatransport.setAlignment(HorizontalAlignment.LEFT);
	    
	    ColumnConfig jenistransport = new ColumnConfig("jenis_transport", "Jenis Transport", 200);
	    jenistransport.setAlignment(HorizontalAlignment.LEFT);
	    
	    ColumnConfig kodetransport = new ColumnConfig("kode_transport", "Kode Transport", 100);
	    kodetransport.setAlignment(HorizontalAlignment.LEFT);
	    
	    ColumnConfig jumlahkapal = new ColumnConfig("jumlah_kapal", "Jumlah Kapal", 80);
	    jumlahkapal.setAlignment(HorizontalAlignment.LEFT);
	    
	    ColumnConfig speckapal = new ColumnConfig("spec_kapal", "Spesifikasi Kapal", 100);
	    speckapal.setAlignment(HorizontalAlignment.LEFT);
	    
	    columns.add(id);
	    columns.add(namatransportir);
	    columns.add(alamat);
	    columns.add(pic);
	    columns.add(namatransport);
	    columns.add(jenistransport);
	    columns.add(kodetransport);
	    columns.add(jumlahkapal);
	    columns.add(speckapal);
	  
	    final ColumnModel cm = new ColumnModel(columns);
	    
	    gridtrans = new EditorGrid<BeanModelMasterBb>(store3, cm);
	    
	    final CellSelectionModel<BeanModelMasterBb> csm = new CellSelectionModel<BeanModelMasterBb>();
	    gridtrans.setSelectionModel(csm);
	    gridtrans.addListener(Events.CellClick, new Listener<BaseEvent>() {            
            public void handleEvent(BaseEvent ge) {
            	String id_transportir= csm.getSelectCell().model.getId_transportir();
            	String nama_transportir= csm.getSelectCell().model.getNama_transportir();
            	String alamat= csm.getSelectCell().model.getAlamat();
            	String telp= csm.getSelectCell().model.getTelp();
            	String pic= csm.getSelectCell().model.getPic();
            	String nama_transport= csm.getSelectCell().model.getNama_transport();
            	String jenis_transport= csm.getSelectCell().model.getJenis_transport();
            	String kode_transport= csm.getSelectCell().model.getKode_transport();
            	String jumlah_kapal= csm.getSelectCell().model.getJumlah_kapal();
            	String spec_kapal= csm.getSelectCell().model.getSpec_kapal();
            	
            	transbean.setId_transportir(id_transportir);
            	transbean.setNama_transportir(nama_transportir);
            	transbean.setAlamat(alamat);
            	transbean.setTelp(telp);
            	transbean.setPic(pic);
            	transbean.setNama_transport(nama_transport);
            	transbean.setJenis_transport(jenis_transport);
            	transbean.setKode_transport(kode_transport);
            	transbean.setJumlah_kapal(jumlah_kapal);
            	transbean.setSpec_kapal(spec_kapal);
            	
	          	  
            	
            	
            }
        });
	    
	    
	    
	    return gridtrans;  
	  }
	  
	  private Grid<BeanModelMasterBb> createGrid() {  
	    
		  final List<ColumnConfig> columns = new ArrayList<ColumnConfig>(); 
		    
		    store1 = new ListStore<BeanModelMasterBb>();
			getdataKit(); 
			
			RowNumberer id = new RowNumberer();  
		    id.setWidth(30);
		    
		    ColumnConfig nmkit = new ColumnConfig("nama_pembangkit", "Nama Pembangkit", 250);
		    nmkit.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig nmpic = new ColumnConfig("nama_pic", "Nama PIC", 120);
		    nmpic.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig alamat = new ColumnConfig("alamat", "Alamat", 100);
		    alamat.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig pemilik = new ColumnConfig("kepemilikan", "Pemilik", 100);
		    pemilik.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig wilayah = new ColumnConfig("wilayah", "Wilayah", 130);
		    wilayah.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig jeniskit = new ColumnConfig("jenis_pembangkit", "Jenis Pembangkit", 130);
		    jeniskit.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig tlp = new ColumnConfig("telp", "Telp", 130);
		    tlp.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig daya = new ColumnConfig("daya_terpasang", "Daya Terpasang", 130);
		    daya.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig sfc = new ColumnConfig("sfc", "SFC", 130);
		    sfc.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig capacity_F = new ColumnConfig("capacity_factor", "Capacity Factor", 130);
		    capacity_F.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig hear_rate = new ColumnConfig("heat_rate", "Heat Rate", 130);
		    hear_rate.setAlignment(HorizontalAlignment.LEFT);
		    
		    columns.add(nmkit);
		    columns.add(jeniskit);
		    columns.add(daya);
		    columns.add(pemilik);
		    columns.add(alamat);
		    columns.add(wilayah);
		    columns.add(nmpic);
		    columns.add(sfc);
		    columns.add(capacity_F);
		    columns.add(hear_rate); 
		  
		    final ColumnModel cm = new ColumnModel(columns);
		    
		    grid = new Grid<BeanModelMasterBb>(store1, cm);
		    grid.setBorders(true); 
	    
	    return grid;  
	  }  
	  
	  private Grid<BeanModelMasterBb> createGridVirtualPemasok() {
		  	
		  	final List<ColumnConfig> columns = new ArrayList<ColumnConfig>(); 
			sm = new CheckBoxSelectionModel<BeanModelMasterBb>();
			columns.add(sm.getColumn());
			
			storeVirtualPemasok = new ListStore<BeanModelMasterBb>();
			getdataPemasokVirtualPemasok();
		
			ColumnConfig id_pemasok = new ColumnConfig("id_pemasok", "id pemasok", 150);
		    id_pemasok.setAlignment(HorizontalAlignment.LEFT);
		    id_pemasok.setHidden(true);
		   
		    ColumnConfig pemasok = new ColumnConfig("pemasok", "Pemasok", 150);
		    pemasok.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig alamat = new ColumnConfig("alamat", "Alamat", 150);
		    alamat.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig pic_presdir = new ColumnConfig("pic_presdir", "PIC Pres Dir", 150);
		    pic_presdir.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig pic_dir_marketing = new ColumnConfig("pic_dir_marketing", "PIC Dir Marketing", 150);
		    pic_dir_marketing.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig pic_man_opr = new ColumnConfig("pic_man_opr", "PIC Mgr Operasi", 150);
		    pic_man_opr.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig status_pemasok = new ColumnConfig("status_pemasok", "Status Pemasok", 150);
		    status_pemasok.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig nama_tambang = new ColumnConfig("nama_tambang", "Nama Tambang", 150);
		    nama_tambang.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig produksi = new ColumnConfig("produksi", "Produksi", 150);
		    produksi.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig loading_port = new ColumnConfig("loading_port", "Loading Port", 150);
		    loading_port.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig fasilitas_loading = new ColumnConfig("fasilitas_loading", "Fasilitas Loading", 150);
		    fasilitas_loading.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig jarak_hauling = new ColumnConfig("jarak_hauling", "Jarak Hauling", 150);
		    jarak_hauling.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig flag_blacklist = new ColumnConfig("flag_blacklist", "Flag Blacklist", 150);
		    flag_blacklist.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig status_aktif = new ColumnConfig("status_aktif", "Status Aktif", 150);
		    status_aktif.setAlignment(HorizontalAlignment.LEFT);
		    
		    ColumnConfig keterangan = new ColumnConfig("keterangan", "Keterangan", 150);
		    keterangan.setAlignment(HorizontalAlignment.LEFT);
			
			
			columns.add(id_pemasok);
			columns.add(pemasok);
			columns.add(alamat);
			columns.add(pic_presdir);
			columns.add(pic_dir_marketing);
			columns.add(pic_man_opr);
			columns.add(status_pemasok);
			columns.add(nama_tambang);
			columns.add(produksi);
			columns.add(loading_port);
			columns.add(fasilitas_loading);
			columns.add(jarak_hauling);
			columns.add(flag_blacklist);
			columns.add(status_aktif);
			columns.add(keterangan);
		  
		    final ColumnModel cm = new ColumnModel(columns);
		    
		    gridVirtualPemasok = new Grid<BeanModelMasterBb>(storeVirtualPemasok, cm);
		    gridVirtualPemasok.setBorders(true);  
		    
		    return gridVirtualPemasok;  
	  }
	  
	  private Grid<BeanModelMasterBb> createGrid1() {  
		    
		  	store2 = new ListStore<BeanModelMasterBb>();
		    getdataPemasok();
		  
		    RowNumberer rn = new RowNumberer();  
		    rn.setWidth(30);
		    
		    id_pemasok.setId("id_pemasok");
		    id_pemasok.setHeader("id pemasok");
		    id_pemasok.setWidth(150);
		    id_pemasok.setAlignment(HorizontalAlignment.LEFT);
		    id_pemasok.setHidden(true);
		    
		    pemasok.setId("pemasok");
		    pemasok.setHeader("Pemasok");
		    pemasok.setWidth(150);
		    pemasok.setAlignment(HorizontalAlignment.LEFT);
		    
		    alamat.setId("alamat");
		    alamat.setHeader("Alamat");
		    alamat.setWidth(150);
		    alamat.setAlignment(HorizontalAlignment.LEFT);
		    
		    pic_presdir.setId("pic_presdir");
		    pic_presdir.setHeader("PIC Pres Dir");
		    pic_presdir.setWidth(150);
		    pic_presdir.setAlignment(HorizontalAlignment.LEFT);
		    
		    pic_dir_marketing.setId("pic_dir_marketing");
		    pic_dir_marketing.setHeader("PIC Dir Marketing");
		    pic_dir_marketing.setWidth(150);
		    pic_dir_marketing.setAlignment(HorizontalAlignment.LEFT);

		    pic_man_opr.setId("pic_man_opr");
		    pic_man_opr.setHeader("PIC Mgr Operasi");
		    pic_man_opr.setWidth(150);
		    pic_man_opr.setAlignment(HorizontalAlignment.LEFT);
		    
		    status_pemasok.setId("status_pemasok");
		    status_pemasok.setHeader("Status Pemasok");
		    status_pemasok.setWidth(150);
		    status_pemasok.setAlignment(HorizontalAlignment.LEFT);
		    
		    nama_tambang.setId("nama_tambang");
		    nama_tambang.setHeader("Nama Tambang");
		    nama_tambang.setWidth(150);
		    nama_tambang.setAlignment(HorizontalAlignment.LEFT);
		    
		    produksi.setId("produksi");
		    produksi.setHeader("Produksi");
		    produksi.setWidth(150);
		    produksi.setAlignment(HorizontalAlignment.LEFT);
		    
		    loading_port.setId("loading_port");
		    loading_port.setHeader("Loading Port");
		    loading_port.setWidth(150);
		    loading_port.setAlignment(HorizontalAlignment.LEFT);
		    
		    fasilitas_loading.setId("fasilitas_loading");
		    fasilitas_loading.setHeader("Fasilitas Loading");
		    fasilitas_loading.setWidth(150);
		    fasilitas_loading.setAlignment(HorizontalAlignment.LEFT);
		    
		    jarak_hauling.setId("jarak_hauling");
		    jarak_hauling.setHeader("Jarak Hauling");
		    jarak_hauling.setWidth(150);
		    jarak_hauling.setAlignment(HorizontalAlignment.LEFT);
		    
		    flag_blacklist.setId("flag_blacklist");
		    flag_blacklist.setHeader("Flag Blacklist");
		    flag_blacklist.setWidth(150);
		    flag_blacklist.setAlignment(HorizontalAlignment.LEFT);
		    
		    status_aktif.setId("status_aktif");
		    status_aktif.setHeader("Status Aktif");
		    status_aktif.setWidth(150);
		    status_aktif.setAlignment(HorizontalAlignment.LEFT);
		    
		    keterangan.setId("keterangan");
		    keterangan.setHeader("Keterangan");
		    keterangan.setWidth(150);
		    keterangan.setAlignment(HorizontalAlignment.LEFT);
			
			
			columns.add(rn);
			columns.add(id_pemasok);
			columns.add(pemasok);
			columns.add(alamat);
			columns.add(pic_presdir);
			columns.add(pic_dir_marketing);
			columns.add(pic_man_opr);
			columns.add(status_pemasok);
			columns.add(nama_tambang);
			columns.add(produksi);
			columns.add(loading_port);
			columns.add(fasilitas_loading);
			columns.add(jarak_hauling);
			columns.add(flag_blacklist);
			columns.add(status_aktif);
			columns.add(keterangan);
		  
		    final ColumnModel cm = new ColumnModel(columns);
		    
		    grid1 = new Grid<BeanModelMasterBb>(store2, cm);
		    grid1.setBorders(true);  
		    
		    return grid1;  
		  }  
	  
	  private void getdataKit() {
		  GWT.log("MASUK DATA GET DATA Kit",null);
		  datakit = new ArrayList<BeanModelMasterBb>();
		  	rkapService.getListMasterBb("KIT", new AsyncCallback<List<BeanModelMasterBb>>() {
						public void onFailure(Throwable caught) {
							GWT.log(caught.getMessage(), null);
						}

						public void onSuccess(List<BeanModelMasterBb> result) {
//							GWT.log("ep total : " + result.size(),null);
//							System.out.println("ep total : " + result.size());
							for (int i = 0; i < result.size(); i++) {
								datakit.add(new BeanModelMasterBb(
										result.get(i).getId_pltu(),
										result.get(i).getNama_pembangkit(),
										result.get(i).getNama_pic(),
										result.get(i).getAlamat(),
										result.get(i).getKepemilikan(),
										result.get(i).getLatitude(),
										result.get(i).getLongitude(),
										result.get(i).getWilayah(),
										result.get(i).getJenis_pembangkit(),
										result.get(i).getTelp(),
										result.get(i).getDaya_terpasang(),
										result.get(i).getSfc(),
										result.get(i).getCapacity_factor(),
										result.get(i).getHeat_rate(),
										result.get(i).getCreateby(),
										result.get(i).getCreatedate(),
										result.get(i).getUpdateby(),
										result.get(i).getUpdatedate(),
										result.get(i).getApp_access()));
							}
							store1.add(datakit);
							grid.unmask();
							GWT.log("grid Kit : " + datakit.size(), null);
							
						}
					});

	}
	  
	  private void getdataPemasok() {
		  GWT.log("MASUK DATA GET DATA Pemasok",null);
		  datapemasok = new ArrayList<BeanModelMasterBb>();
		  	rkapService.getListMasterBb("PEMASOK", new AsyncCallback<List<BeanModelMasterBb>>() {
						public void onFailure(Throwable caught) {
							GWT.log(caught.getMessage(), null);
						}

						public void onSuccess(List<BeanModelMasterBb> result) {
//							GWT.log("ep total : " + result.size(),null);
//							System.out.println("ep total : " + result.size());
							for (int i = 0; i < result.size(); i++) {
								datapemasok.add(new BeanModelMasterBb(
										result.get(i).getId_pemasok(),
										result.get(i).getPemasok(),
										result.get(i).getAlamat(),
										result.get(i).getPic_presdir(),
										result.get(i).getPic_presdir_hp(),
										result.get(i).getPic_dir_marketing(),
										result.get(i).getPic_dir_marketing_hp(),
										result.get(i).getPic_man_opr(),
										result.get(i).getPic_man_opr_hp(),
										result.get(i).getStatus_pemasok(),
										result.get(i).getNama_tambang(),
										result.get(i).getProduksi(),
										result.get(i).getLoading_port(),
										result.get(i).getFasilitas_loading(),
										result.get(i).getJarak_hauling(),
										result.get(i).getFlag_blacklist(),
										result.get(i).getStatus_aktif(),
										result.get(i).getKeterangan(),
										result.get(i).getCreateby(),
										result.get(i).getCreatedate(),
										result.get(i).getUpdateby(),
										result.get(i).getUpdatedate(),
										result.get(i).getApp_access(),
										result.get(i).getId_pusat(),
										result.get(i).getStatus(),
										result.get(i).getTelp(),
										result.get(i).getFax(),
										result.get(i).getEmail()));
							}
							store2.add(datapemasok);
							grid1.unmask();
							GWT.log("grid Pemasok : " + datapemasok.size(), null);
							
						}
					});

	}
	  
	  private void getdataPemasokVirtualPemasok() {
		  GWT.log("MASUK DATA GET DATA Pemasok",null);
		  datapemasok = new ArrayList<BeanModelMasterBb>();
		  	rkapService.getListMasterBb("PEMASOK", new AsyncCallback<List<BeanModelMasterBb>>() {
						public void onFailure(Throwable caught) {
							GWT.log(caught.getMessage(), null);
						}

						public void onSuccess(List<BeanModelMasterBb> result) {
//							GWT.log("ep total : " + result.size(),null);
//							System.out.println("ep total : " + result.size());
							for (int i = 0; i < result.size(); i++) {
								datapemasok.add(new BeanModelMasterBb(
										result.get(i).getId_pemasok(),
										result.get(i).getPemasok(),
										result.get(i).getAlamat(),
										result.get(i).getPic_presdir(),
										result.get(i).getPic_presdir_hp(),
										result.get(i).getPic_dir_marketing(),
										result.get(i).getPic_dir_marketing_hp(),
										result.get(i).getPic_man_opr(),
										result.get(i).getPic_man_opr_hp(),
										result.get(i).getStatus_pemasok(),
										result.get(i).getNama_tambang(),
										result.get(i).getProduksi(),
										result.get(i).getLoading_port(),
										result.get(i).getFasilitas_loading(),
										result.get(i).getJarak_hauling(),
										result.get(i).getFlag_blacklist(),
										result.get(i).getStatus_aktif(),
										result.get(i).getKeterangan(),
										result.get(i).getCreateby(),
										result.get(i).getCreatedate(),
										result.get(i).getUpdateby(),
										result.get(i).getUpdatedate(),
										result.get(i).getApp_access(),
										result.get(i).getId_pusat(),
										result.get(i).getStatus(),
										result.get(i).getTelp(),
										result.get(i).getFax(),
										result.get(i).getEmail()));
							}
							storeVirtualPemasok.add(datapemasok);
							gridVirtualPemasok.unmask();
							GWT.log("grid Pemasok : " + datapemasok.size(), null);
							
						}
					});

	}
	  
	  private void getdataTrans() {
		  GWT.log("MASUK DATA GET DATA Transportir",null);
		  datatrans = new ArrayList<BeanModelMasterBb>();
		  	rkapService.getListMasterBb("TRANSPORTIR", new AsyncCallback<List<BeanModelMasterBb>>() {
						public void onFailure(Throwable caught) {
							GWT.log(caught.getMessage(), null);
						}

						public void onSuccess(List<BeanModelMasterBb> result) {
//							GWT.log("ep total : " + result.size(),null);
//							System.out.println("ep total : " + result.size());
							for (int i = 0; i < result.size(); i++) {
								System.out.println("nama trans ui: " + result.get(i).getNama_transport());
								datatrans.add(new BeanModelMasterBb(
										result.get(i).getId_transportir(),
										result.get(i).getNama_transportir(),
										result.get(i).getAlamat(),
										result.get(i).getTelp(),
										result.get(i).getPic(),
										result.get(i).getNama_transport(),
										result.get(i).getJenis_transport(),
										result.get(i).getKode_transport(),
										result.get(i).getJumlah_kapal(),
										result.get(i).getSpec_kapal(),
										result.get(i).getCreateby(),
										result.get(i).getCreatedate(),
										result.get(i).getUpdateby(),
										result.get(i).getUpdatedate(),
										result.get(i).getApp_access()));
							}
							store3.add(datatrans);
							gridtrans.unmask();
							GWT.log("grid Trans : " + datatrans.size(), null);
							
						}
					});

	}  
}